# Maintainer: BlackIkeEagle <ike DOT devolder AT gmail DOT com>
# Contributor: rebel <novakpetya at yahoo dot co dot uk>

pkgname=qt5pas
_lazarus_tag=2_2_4
_lazarus_version=2.2.4
pkgver=2.6.$_lazarus_version
pkgrel=1
pkgdesc='Free Pascal Qt5 binding library updated by lazarus IDE'
arch=('loong64' 'x86_64')
url='https://gitlab.com/freepascal.org/lazarus/lazarus/-/tree/main/lcl/interfaces/qt5/cbindings'
license=('LGPL3')
depends=('qt5-base' 'qt5-x11extras')
source=("https://gitlab.com/freepascal.org/lazarus/lazarus/-/archive/lazarus_${_lazarus_tag}/lazarus-lazarus_${_lazarus_tag}.tar.bz2")
sha512sums=('1fe2e7e1005cedb42d3e5c0cbd294d335da71e5e7043085f28ebdf536b3319b137ce6c7494d808de399f406b6636ffbf37fe0d5dae3d584bb2745228c14a0ccf')

build() {
    cd "lazarus-lazarus_${_lazarus_tag}/lcl/interfaces/qt5/cbindings"
    qmake-qt5 "QT += x11extras"
    make
}

package() {
    cd "lazarus-lazarus_${_lazarus_tag}/lcl/interfaces/qt5/cbindings"
    make INSTALL_ROOT="$pkgdir" install
}
